﻿using System;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Startup.Project.Classes;
using Startup.Project.Interfaces;
using Startup.Shell.Domain;

namespace Startup.Shell.ModelDesignerPreview
{
	public class ToolbarPanelPreview : IDesignerPreview
	{
		public PreviewContainer ToolbarChild { get; set; }
		public PreviewContainer ContentChild { get; set; }

		public ToolbarPanelPreview()
		{
			ToolbarChild = new PreviewContainer { Preview = new CommandsPanelPreview() };
			ContentChild = new PreviewContainer();
		}

		public override ImageSource PreviewImage
		{
			get { return new BitmapImage(new Uri("/Startup.Shell;component/Resources/ToolbarPanel.png", UriKind.RelativeOrAbsolute)); }
		}

		public override PreviewContainer[] Children
		{
			get { return new[] { ToolbarChild, ContentChild }; }
		}

		public override IDesignerPreview CreateInstance()
		{
			return new ToolbarPanelPreview();
		}

		public override UiContainer GetContainer(ClassBase dataContextType, StartupProperty property)
		{
			return new GridContainer(Orientation.Vertical, 0, 100);
		}
	}
}
